Rails.application.routes.draw do
  devise_for :admin_users, ActiveAdmin::Devise.config
  ActiveAdmin.routes(self)
  #验证码
  post "captcha" => "captcha#create"
  post "captcha/quick" => "captcha#quick"
  put "captcha" => "captcha#update"
  post "captcha/check" => "captcha#check"
  #用户
  put "users" => "users#update"
  post "users/login" => "users#login"
  post "users/autoLogin" => "users#auto_login"
  put "users/reset_password" => "users#reset_password"
  #车辆
  get "bikes" => "bikes#index"
  get "bikes/:id" => "bikes#show"
  post "bikes/:id/warning" => "bikes#warning"
  put "bikes/:id" => "bikes#lock"
  delete "bikes/:id" => "bikes#unlock"
  post "bike/warning" => "bikes#warning"
  post "EBike/push" => "bikes#warning"
  get "EBike/push" => "bikes#warning"

  #数据同步
  post "data" => "data#create"
  put "data" => "data#update"
  patch "data" => "data#delete"
  #版本更新
  get "app/:platform/ver" => "app_version#index"
  #设备更新
  put 'device' => "device#update"
end
